package com.yanfu.controller;

import com.yanfu.entity.Student;
import com.yanfu.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Authour Zhang Yanfu
 * @Date 2018/1/27.
 * @Email 1105564280@qq.com
 * @WeChat zyfJava
 */
@RestController
public class IndexController {
    @Autowired
    private StudentMapper studentMapper;

    @RequestMapping(path = "/index")
    public Student getStu(){
        Student student = studentMapper.getStuById(1);
        return student;
    }
}
